3.215 \(\int \frac {1}{\csc (c+d x)+\sin (c+d x)} \, dx\)

Optimal. Leaf size=23 \[ -\frac {\tanh ^{-1}\left (\frac {\cos (c+d x)}{\sqrt {2}}\right )}{\sqrt {2} d} \]

[Out]

-1/2*arctanh(1/2*cos(d*x+c)*2^(1/2))/d*2^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4397, 3186, 206} \[ -\frac {\tanh ^{-1}\left (\frac {\cos (c+d x)}{\sqrt {2}}\right )}{\sqrt {2} d} \]

Antiderivative was successfully verified.

[In]

Int[(Csc[c + d*x] + Sin[c + d*x])^(-1),x]

[Out]

-(ArcTanh[Cos[c + d*x]/Sqrt[2]]/(Sqrt[2]*d))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \frac {1}{\csc (c+d x)+\sin (c+d x)} \, dx &=\int \frac {\sin (c+d x)}{1+\sin ^2(c+d x)} \, dx\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\cos (c+d x)}{\sqrt {2}}\right )}{\sqrt {2} d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.19, size = 61, normalized size = 2.65 \[ -\frac {\tanh ^{-1}\left (\frac {\cos (c)-(\sin (c)-i) \tan \left (\frac {d x}{2}\right )}{\sqrt {2}}\right )+\tanh ^{-1}\left (\frac {\cos (c)-(\sin (c)+i) \tan \left (\frac {d x}{2}\right )}{\sqrt {2}}\right )}{\sqrt {2} d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Csc[c + d*x] + Sin[c + d*x])^(-1),x]

[Out]

-((ArcTanh[(Cos[c] - (-I + Sin[c])*Tan[(d*x)/2])/Sqrt[2]] + ArcTanh[(Cos[c] - (I + Sin[c])*Tan[(d*x)/2])/Sqrt[
2]])/(Sqrt[2]*d))

________________________________________________________________________________________

fricas [B]  time = 0.65, size = 44, normalized size = 1.91 \[ \frac {\sqrt {2} \log \left (-\frac {\cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \cos \left (d x + c\right ) + 2}{\cos \left (d x + c\right )^{2} - 2}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log(-(cos(d*x + c)^2 - 2*sqrt(2)*cos(d*x + c) + 2)/(cos(d*x + c)^2 - 2))/d

________________________________________________________________________________________

giac [B]  time = 1.20, size = 68, normalized size = 2.96 \[ \frac {\sqrt {2} \log \left (\frac {{\left | -4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 6 \right |}}{{\left | 4 \, \sqrt {2} - \frac {2 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 6 \right |}}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

1/4*sqrt(2)*log(abs(-4*sqrt(2) - 2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 6)/abs(4*sqrt(2) - 2*(cos(d*x + c)
- 1)/(cos(d*x + c) + 1) + 6))/d

________________________________________________________________________________________

maple [A]  time = 0.12, size = 21, normalized size = 0.91 \[ -\frac {\arctanh \left (\frac {\cos \left (d x +c \right ) \sqrt {2}}{2}\right ) \sqrt {2}}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

-1/2*arctanh(1/2*cos(d*x+c)*2^(1/2))/d*2^(1/2)

________________________________________________________________________________________

maxima [B]  time = 0.57, size = 176, normalized size = 7.65 \[ \frac {\sqrt {2} \log \left (-\frac {2 \, {\left (\sqrt {2} + 1\right )} \cos \left (d x + c\right ) - \cos \left (d x + c\right )^{2} - \sin \left (d x + c\right )^{2} - 2 \, \sqrt {2} - 3}{2 \, {\left (\sqrt {2} - 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sqrt {2} + 3}\right ) + \sqrt {2} \log \left (-\frac {2 \, {\left (\sqrt {2} - 1\right )} \cos \left (d x + c\right ) - \cos \left (d x + c\right )^{2} - \sin \left (d x + c\right )^{2} + 2 \, \sqrt {2} - 3}{2 \, {\left (\sqrt {2} + 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sqrt {2} + 3}\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

1/8*(sqrt(2)*log(-(2*(sqrt(2) + 1)*cos(d*x + c) - cos(d*x + c)^2 - sin(d*x + c)^2 - 2*sqrt(2) - 3)/(2*(sqrt(2)
 - 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(d*x + c)^2 - 2*sqrt(2) + 3)) + sqrt(2)*log(-(2*(sqrt(2) - 1)*cos(d*x
 + c) - cos(d*x + c)^2 - sin(d*x + c)^2 + 2*sqrt(2) - 3)/(2*(sqrt(2) + 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(
d*x + c)^2 + 2*sqrt(2) + 3)))/d

________________________________________________________________________________________

mupad [B]  time = 0.66, size = 42, normalized size = 1.83 \[ \frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {2\,\sqrt {2}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1}\right )}{2\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x) + 1/sin(c + d*x)),x)

[Out]

(2^(1/2)*atanh((2*2^(1/2)*sin(c/2 + (d*x)/2)^2)/(2*sin(c/2 + (d*x)/2)^2 + 1)))/(2*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sin {\left (c + d x \right )} + \csc {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(1/(sin(c + d*x) + csc(c + d*x)), x)

________________________________________________________________________________________